package com.study.dao.impl;

import com.study.dao.DataDictionaryDao;
import com.study.entity.DataDictionary;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate5.HibernateTemplate;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Administrator on 2017/10/25.
 */
@Repository
public class DataDictionaryDaoImpl implements DataDictionaryDao {
    @Autowired
    private HibernateTemplate hibernateTemplate;
    @Override
    public DataDictionary findOneById(Integer id) {
        return hibernateTemplate.get(DataDictionary.class,id);
    }

    @Override
    public List<DataDictionary> findList(DataDictionary dataDictionary) {
        return hibernateTemplate.findByExample(dataDictionary);
    }

    @Override
    public int updateOne(DataDictionary dataDictionary) {
        return 0;
    }

    @Override
    public int saveOne(DataDictionary dataDictionary) {
        return 0;
    }

    @Override
    public int deleteById(Integer id) {
        return 0;
    }
}
